﻿using System;

namespace 嵌套for循环
{
    internal static class Program
    {
        /// <summary>
        /// 打印四行 五列 奇数行为# 偶数行为*
        /// </summary>
        /// <param name="args"></param>
        // ReSharper disable once UnusedParameter.Local
        private static void Main(string[] args)
        {
            //4行外层循环做1次
            for (int i = 0; i < 4; i++)
            {
                //5列内层循环做n次
                if (i%2==0)
                {
                    for (int j = 0; j < 5; j++)
                    {
                        Console.Write("偶数\t");
                    }
                }
                else
                {
                    for (int j = 0; j < 5; j++)
                    {
                        Console.Write("奇数\t");
                    }
                }
                Console.WriteLine();
            }
        }
    }
}
